package com.sc.VenusQueryBeta.model.setting;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.home.HomeApi;
import com.sc.VenusQueryBeta.contract.setting.SettingContract;

import io.reactivex.Observable;

/**
 * Created by SC-02 on 2018/9/19.
 * 設置model 继承Basemodel 并且实现契约累的model方法
 */

public class SettingModel extends BaseModel implements SettingContract.ISettingModel {

    /**
     * 實例化
     * @return 該對象
     */
    public static SettingModel newInstance() {
        return new SettingModel();
    }

    @Override
    public Observable<String> exit(String loginUserId) {
        return RetrofitCreateHelper.createApi(HomeApi.class, Host.HostVGSestMessageserver).exitlogin(loginUserId).compose(RxHelper.<String>rxSchedulerHelper());

    }
}
